package com.selenium.dinner;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;

import com.opera.core.systems.internal.WatirUtils;
import com.thoughtworks.selenium.DefaultSelenium;

public class Gallery extends Abstract{

	public void testTallery(DefaultSelenium selenium, WebDriver driver) throws Exception{
		waitForElement(selenium, Next);
		for (int i=0;;i++){
			waitForText(1);
			driver.findElement(By.xpath(Next)).click();
			waitForText(2);
			if (i>3) break;
		}
		waitForElement(selenium, IMG_7);
		driver.findElement(By.xpath(IMG_7)).click();
		waitForElement(selenium, IMAGE_PREVIEW);
		driver.findElement(By.xpath(IMAGE_PREVIEW)).click();
		for (int i=0;;i++){
			waitForText(1);
			driver.findElement(By.xpath(Previous)).click();
			waitForText(2);
			if (i>3) break;
		}
		driver.findElement(By.xpath(IMG_1)).click();
		waitForElement(selenium, IMAGE_PREVIEW);
		driver.findElement(By.xpath(IMAGE_PREVIEW)).click();
	}
}
